Optimal. Leaf size=48 \[ -\frac {c (A+B \tan (e+f x))^2}{2 a^2 (i A-B) f (1+i \tan (e+f x))^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.051, Rules used = {3669, 37}
\begin {gather*} -\frac {c (A+B \tan (e+f x))^2}{2 a^2 f (-B+i A) (1+i \tan (e+f x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 37
Rule 3669
Rubi steps
\begin {align*} \int \frac {(A+B \tan (e+f x)) (c-i c \tan (e+f x))}{(a+i a \tan (e+f x))^2} \, dx &=\frac {(a c) \text {Subst}\left (\int \frac {A+B x}{(a+i a x)^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {c (A+B \tan (e+f x))^2}{2 a^2 (i A-B) f (1+i \tan (e+f x))^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.67, size = 58, normalized size = 1.21 \begin {gather*} \frac {(-3 i A-B+(A-3 i B) \tan (e+f x)) (c-i c \tan (e+f x))}{8 a^2 f (-i+\tan (e+f x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.24, size = 46, normalized size = 0.96
method | result | size |
derivativedivides | \(\frac {c \left (-\frac {i A -B}{2 \left (-i+\tan \left (f x +e \right )\right )^{2}}-\frac {i B}{-i+\tan \left (f x +e \right )}\right )}{f \,a^{2}}\) | \(46\) |
default | \(\frac {c \left (-\frac {i A -B}{2 \left (-i+\tan \left (f x +e \right )\right )^{2}}-\frac {i B}{-i+\tan \left (f x +e \right )}\right )}{f \,a^{2}}\) | \(46\) |
risch | \(\frac {c \,{\mathrm e}^{-2 i \left (f x +e \right )} B}{4 a^{2} f}+\frac {i c \,{\mathrm e}^{-2 i \left (f x +e \right )} A}{4 a^{2} f}-\frac {c \,{\mathrm e}^{-4 i \left (f x +e \right )} B}{8 a^{2} f}+\frac {i c \,{\mathrm e}^{-4 i \left (f x +e \right )} A}{8 a^{2} f}\) | \(80\) |
norman | \(\frac {\frac {A c \tan \left (f x +e \right )}{a f}+\frac {i A c +B c}{2 a f}+\frac {\left (-i A c +3 B c \right ) \left (\tan ^{2}\left (f x +e \right )\right )}{2 a f}-\frac {i c B \left (\tan ^{3}\left (f x +e \right )\right )}{a f}}{a \left (1+\tan ^{2}\left (f x +e \right )\right )^{2}}\) | \(95\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.67, size = 49, normalized size = 1.02 \begin {gather*} -\frac {{\left (2 \, {\left (-i \, A - B\right )} c e^{\left (2 i \, f x + 2 i \, e\right )} - {\left (i \, A - B\right )} c\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{8 \, a^{2} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 158 vs. \(2 (37) = 74\).
time = 0.20, size = 158, normalized size = 3.29 \begin {gather*} \begin {cases} \frac {\left (\left (4 i A a^{2} c f e^{2 i e} - 4 B a^{2} c f e^{2 i e}\right ) e^{- 4 i f x} + \left (8 i A a^{2} c f e^{4 i e} + 8 B a^{2} c f e^{4 i e}\right ) e^{- 2 i f x}\right ) e^{- 6 i e}}{32 a^{4} f^{2}} & \text {for}\: a^{4} f^{2} e^{6 i e} \neq 0 \\\frac {x \left (A c e^{2 i e} + A c - i B c e^{2 i e} + i B c\right ) e^{- 4 i e}}{2 a^{2}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.62, size = 84, normalized size = 1.75 \begin {gather*} -\frac {2 \, {\left (A c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - i \, A c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - B c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - A c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{a^{2} f {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - i\right )}^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.54, size = 50, normalized size = 1.04 \begin {gather*} \frac {\frac {c\,\left (A-B\,1{}\mathrm {i}\right )}{2}+B\,c\,\mathrm {tan}\left (e+f\,x\right )}{a^2\,f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^2\,1{}\mathrm {i}+2\,\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________